<h1>Files</h1>
<?php
$i = 0;
foreach ($this->items as $item) {?>
    <div class="content-item filemanager_file_list<?php if (($i % 4) == 0) {echo " clear";} ?>">
    <?php if ($item->hooks['filemanager_file']->isImage()):?>
    <p>
        <a href="<?php echo $this->url(array('id' => $item['id']), $item['type']);?>">
            <img src="<?php echo $item->hooks['filemanager_file']->getUrl(145);?>"
                 alt="<?php echo $this->translate('Image').': '.$item['title'];?>" />
        </a>
    </p>
    <?php else:?>
    <p>
        <a href="<?php echo $this->url(array('id' => $item['id']), $item['type']);?>">
            <img src="<?php echo $this->getTypeImage($item->hooks['filemanager_file']->mimetype);?>"
                 alt="<?php echo $this->translate('File').': '.$item['title'];?>" />
        </a>
    </p>
    <?php endif;?>
    <h2>
        <a href="<?php echo $this->url(array('id' => $item['id']), $item['type']);?>">
            <?php echo $this->escape($item['title']);?>
        </a>
    </h2>
    <p><?php echo $this->filter($item, 'content', 350); ?></p>
    <?php if($item->hooks) {
        foreach ($item->hooks as $name => $hook) {
            if ($name != "filemanager_file") {
                echo $hook;
            }
        }
    }
    ?>
    </div>
<?php
	$i++;
}
?>